package projectwork.shchuangge.cn.com.newproject.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import java.util.List;

/**
 * Created by 赵航 on 2017/6/23.
 *
 * 暂时不用
 */

public class HorizontalRecycleViewAdpter extends RecyclerView.Adapter {
    private List<Integer> mList;

    public HorizontalRecycleViewAdpter(List list){
        mList = list;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        ImageView imageView = new ImageView(parent.getContext());
        ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
        imageView.setBackgroundResource(mList.get(viewType));


        return new HorzintalViewHolder(imageView);
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return mList==null?0:mList.size();
    }

    public class HorzintalViewHolder extends RecyclerView.ViewHolder{

        public HorzintalViewHolder(View itemView) {
            super(itemView);
        }
    }
}
